package com.lagou.controller;

import com.lagou.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zy
 * @version 1.0
 * @date 2021/3/16 11:02
 */
@RestController
@RequestMapping("/api")
public class EmailController {

    @Autowired
    private EmailService emailService;

    @RequestMapping("/email")
    public String sendEmail(String emailAddress, String code){
        return emailService.sendEmail(emailAddress,code);
    }

}
